package magicloan.auctionpocket.ui.activity;

import android.view.View;
import android.widget.EditText;
import com.utils.module.StringUtils;
import com.utils.module.android.ToastUtil;
import magicloan.auctionpocket.R;
import magicloan.auctionpocket.ui.base.BaseActivity;

/**
 * Created by hechao on 2018/2/2.
 */
public class SuggestActivity extends BaseActivity {

    private EditText mEdit_content , mEdit_email ;
    private String mStrContent , mEmail ;
    @Override
    protected int setContentView() {
        return R.layout.ac_suggest ;
    }

    @Override
    protected void beforeInitView() {

    }

    @Override
    protected void afterInitView() {

        setTitle("投诉建议",null);

        mEdit_content = (EditText) findViewById(R.id.edit_content);

        mEdit_email = (EditText) findViewById(R.id.edit_email);

        findViewById(R.id.tv_submit).setOnClickListener(this);

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()){
            case R.id.tv_submit:
                mStrContent = mEdit_content.getText().toString().trim();
                mEmail = mEdit_email.getText().toString().trim();
                if ( !StringUtils.isEmpty(mStrContent)){
                    if ( mStrContent.length() < 5 ){
                        ToastUtil.showToast(mActivity,"反馈内容不能少于150个字!");
                    }else{
                        ToastUtil.showToast(mActivity,"提交");
                    }
                }else{
                    ToastUtil.showToast(mActivity,"请填充完整信息");
                }
                break;
        }
    }


}
